﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package org.aswing {

    public class StyleTune {

        public var cGradient:Number;
        public var bOffset:Number;
        public var bGradient:Number;
        public var shadowAlpha:Number;
        public var round:Number;
        private var mideAdjuster:StyleTune;

        public function StyleTune(_arg1:Number=0.2, _arg2:Number=0.15, _arg3:Number=0.35, _arg4:Number=0.2, _arg5:Number=0, _arg6:StyleTune=null){
            this.cGradient = _arg1;
            this.bOffset = _arg2;
            this.bGradient = _arg3;
            this.shadowAlpha = _arg4;
            this.round = _arg5;
            if (_arg6 == null){
                this.mideAdjuster = this;
            } else {
                this.mideAdjuster = _arg6;
            };
        }
        public function get mide():StyleTune{
            return (this.mideAdjuster);
        }
        public function set mide(_arg1:StyleTune):void{
            this.mideAdjuster = _arg1;
        }
        public function sharpen(_arg1:Number):StyleTune{
            return (new StyleTune((this.cGradient * _arg1), (this.bOffset * _arg1), (this.bGradient * _arg1), (this.shadowAlpha * _arg1), this.round, this.mide));
        }
        public function changeRound(_arg1:Number):StyleTune{
            return (new StyleTune(this.cGradient, this.bOffset, this.bGradient, this.shadowAlpha, _arg1, this.mide));
        }
        public function clone():StyleTune{
            return (new StyleTune(this.cGradient, this.bOffset, this.bGradient, this.shadowAlpha, this.round, this.mide));
        }
        public function getCLight(_arg1:ASColor):ASColor{
            return (_arg1.changeLuminance((_arg1.getLuminance() + (this.cGradient / 2))));
        }
        public function getCDark(_arg1:ASColor):ASColor{
            return (_arg1.changeLuminance((_arg1.getLuminance() - (this.cGradient / 2))));
        }
        public function getBLight(_arg1:ASColor):ASColor{
            return (_arg1.changeLuminance(((_arg1.getLuminance() + (this.bGradient / 2)) + this.bOffset)));
        }
        public function getBDark(_arg1:ASColor):ASColor{
            return (_arg1.changeLuminance(((_arg1.getLuminance() - (this.bGradient / 2)) + this.bOffset)));
        }
        public function getShadowAlpha():Number{
            return (this.shadowAlpha);
        }
        public function getRound():Number{
            return (this.round);
        }
        public function toString():String{
            return (((((((((((("StyleTune{cGradient:" + this.cGradient) + ", bOffset:") + this.bOffset) + ", bGradient:") + this.bGradient) + ", shadowAlpha:") + this.shadowAlpha) + ", round:") + this.round) + ((this.mideAdjuster)!=this) ? ("mide:" + this.mideAdjuster.toString()) : "") + "}"));
        }

    }
}//package org.aswing 
